package org.ccams.dao;

import java.util.List;

import org.ccams.domain.VProduce;
import org.ccams.util.PageParameter;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

public class VProduceDAO extends SqlMapClientDaoSupport {
	
	/**
	 * 返回指定页码的数据
	 * @return
	 */
	@SuppressWarnings({ "unchecked", "deprecation" })
	public  List<VProduce> getVProduce(PageParameter pageParmeter){		
		return getSqlMapClientTemplate().queryForList("v_produce.getvproduceByPage", pageParmeter);
	}
	/**
	 * 返回记录总数
	 * @return
	 */
	public int getCount(String keywords){
		return (Integer)getSqlMapClientTemplate().queryForObject("v_produce.getvproduceCount",keywords);
	}
	/**
	 * 返回指定页码的数据_物料准备
	 * @return
	 */
	@SuppressWarnings({ "unchecked", "deprecation" })
	public  List<VProduce> getVProduce_materielok(PageParameter pageParmeter){		
		return getSqlMapClientTemplate().queryForList("v_produce.getvproduceByPage_materielok", pageParmeter);
	}
	/**
	 * 返回记录总数_物料准备
	 * @return
	 */
	public int getCount_materielok(String keywords){
		return (Integer)getSqlMapClientTemplate().queryForObject("v_produce.getvproduceCount_materielok",keywords);
	}	
	/**
	 * 返回指定页码的数据_质检入库
	 * @return
	 */
	@SuppressWarnings({ "unchecked", "deprecation" })
	public  List<VProduce> getVProduce_Checkinstock(PageParameter pageParmeter){		
		return getSqlMapClientTemplate().queryForList("v_produce.getvproduceByPage_Checkinstock", pageParmeter);
	}
	/**
	 * 返回记录总数_质检入库
	 * @return
	 */
	public int getCount_OutCheck(String keywords){
		return (Integer)getSqlMapClientTemplate().queryForObject("v_produce.getvproduceCount_OutCheck",keywords);
	}	
	/**
	 * 返回指定页码的数据_外发出库
	 * @return
	 */
	@SuppressWarnings({ "unchecked", "deprecation" })
	public  List<VProduce> getVProduce_OutCheck(PageParameter pageParmeter){		
		return getSqlMapClientTemplate().queryForList("v_produce.getvproduceByPage_OutCheck", pageParmeter);
	}
	/**
	 * 返回记录总数_外发出库
	 * @return
	 */
	public int getCount_Checkinstock(String keywords){
		return (Integer)getSqlMapClientTemplate().queryForObject("v_produce.getvproduceCount_Checkinstock",keywords);
	}	
		
	/**
	 * 返回所有数据
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public  List<VProduce> getALLVProduce(){
		return getSqlMapClientTemplate().queryForList("v_produce.getAllvproduce");
	}	
	/**
	 * 更新物料准备
	 * @param t
	 * @return
	 */
	public int updatev_produceMateriel(VProduce t ){
		return getSqlMapClientTemplate().update("v_produce.updatev_produceMateriel", t);
	}
	/**
	 * 更新入库检验
	 * @param t
	 * @return
	 */
	public int updatev_produce_Checkinstock(VProduce t ){
		return getSqlMapClientTemplate().update("v_produce.updatev_produce_Checkinstock", t);
	}	
	/**
	 * 更新外发出库
	 * @param t
	 * @return
	 */
	public int updatev_produce_OutCheck(VProduce t ){
		return getSqlMapClientTemplate().update("v_produce.updatev_produce_OutCheck", t);
	}		
}